package com.invite.me.beans.adpater;

import android.support.annotation.Nullable;
import android.view.View;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.request.RequestOptions;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import com.invite.me.R;
import com.invite.me.beans.bilnddatabean.InformationBean;

import java.util.List;

public class InformationxxAdptater extends BaseQuickAdapter<InformationBean,BaseViewHolder> {


    public InformationxxAdptater(int layoutResId, @Nullable List<InformationBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, InformationBean item) {
        int position = helper.getPosition();
        View view = helper.getView(R.id.xianshiview);
        if(position==0){
            view.setVisibility(View.GONE);
        }

        helper.setText(R.id.name,item.getName());

        RequestOptions options = new RequestOptions()
                .placeholder(R.mipmap.xxzw);
        Glide.with(mContext)
                .load(item.getUil())
                .apply(options)
                .apply(RequestOptions.bitmapTransform(new RoundedCorners(10)))//圆角半径
                .into((ImageView) helper.getView(R.id.touxiang));

    }
}
